#include <stdio.h>

#include "Quad.h"
#include "Render.h"

void Quad::Init(QuadInfo info)
{
	qInfo = info;
	tNode.setSize(SMALL);
}

void Quad::Draw()
{
	if(state == SELECTED)
		sInfo.color = GRAY;
	else
		sInfo.color = WHITE;
	Render* ren = Render::getInstance();

	char message[STRING_SIZE];
	sprintf_s(message, "%i:%i:%i", qInfo.Suns, qInfo.Enemies, qInfo.Stations);

	tNode.setData(message, WHITE, XY(SQUARE_SIZE));
	tNode.setPos(sInfo.pos);
	sNode.setData(sInfo);
	
	ren->AddToDrawList(&tNode);
	ren->AddToDrawList(&sNode);
}